package com.ruoyi.system.service.h5;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.MiniSelfSelection;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author ld
* @description 针对表【mini_self_selection(自选表)】的数据库操作Service
* @createDate 2023-11-19 17:39:49
*/
public interface MiniSelfSelectionService extends IService<MiniSelfSelection> {

    /**
     * 添加自选
     * @param selfSelection
     * @return
     */
    AjaxResult add(MiniSelfSelection selfSelection);

    /**
     * 自选列表
     * @param type
     * @param openid
     * @return
     */
    AjaxResult selectionList(String type,String openid);

    /**
     * 取消自选
     *
     * @param id
     * @param openid
     * @param type
     * @param stockNo
     * @return
     */
    AjaxResult disabled(Long id, String openid, String type, String stockNo);

    /**
     * 以openid查询自选数量
     * @param openid
     * @return
     */
    List<MiniSelfSelection> selectSelfSelectionCountByOpenid(String openid);

    /**
     * 检查是否添加到自选了
     *
     * @param type
     * @param openid
     * @param id
     * @param stockNo
     * @return
     */
    AjaxResult<Integer> check(String type, String openid, Long id, String stockNo);
}
